﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MediaGerbil
{
    public partial class About : Form
    {
        private readonly string DiffMatchPatchVersion = "20111010";
        private readonly DateTime DiffMatchPatchVersionDate = new DateTime(2010, 10, 10);
        private readonly string HtmlAgilityPackVersion = "1.4.0";
        private readonly DateTime HtmlAgilityPackVersionDate = new DateTime(2010, 5, 7);
        private readonly string MediaInfoVersion = "0.7.39";
        private readonly DateTime MediaInfoVersionDate = new DateTime(2011, 1, 3);

        public About()
        {
            InitializeComponent();
            PopulateVersionInfo();
        }

        private void PopulateVersionInfo()
        {
            string rtfText = @"This is \b MediaGerbil v{0}\b0  using \par \par \b GerbilLib v{1}\b \par \par \b diff_match_patch v{2}\b0 \par built {3} \par \par \b HtmlAgilityPack v{4}\b0 \par built {5} \par \par \b MediaInfo v{6}\b0 \par built {7}";
            string resolved = string.Format(rtfText, ProductVersion, GerbilLib.Version.Info, DiffMatchPatchVersion, DiffMatchPatchVersionDate.ToShortDateString(), HtmlAgilityPackVersion, HtmlAgilityPackVersionDate.ToShortDateString(), MediaInfoVersion, MediaInfoVersionDate.ToShortDateString());
            richTextBox1.Rtf = @"{\rtf1\ansi " + resolved + @"}";
        }
    }
}
